package com.wcarmon.unittest {

    import flexunit.framework.TestCase;
    import flexunit.framework.TestSuite;
	import com.wcarmon.life.view.customFields.ParentProjectField;
    import com.wcarmon.life.model.LifeModelLocator;	
    	
    	
	public class ParentProjectFieldTest extends TestCase {
	
		public function ParentProjectFieldTest(){
		//public function ParentProjectFieldTest(methodName : String){
			super(methodName);
		} 
            
		override public function setUp():void {
			var model : LifeModelLocator = LifeModelLocator.getInstance();
			model.projectComboBoxArray = [
				{"data":-1,"content":"","ref_meta":"","label":""},{"data":"364","ref_meta":"","label":"a1a1a1a1","content":"a1a1a1a1"},{"data":"322","ref_meta":"","label":"aaaaaa","content":"aaaaaa"},{"data":"323","ref_meta":"","label":"aaaaaaaaaaaaaaaaa","content":"aaaaaaaaaaaaaaaaa"},{"data":"341","ref_meta":"","label":"aaaaaaaaaaaaaaaaaaaa","content":"aaaaaaaaaaaaaaaaaaaa"},{"data":"122","ref_meta":"","label":"another test Project","content":"another test Project"},{"data":"224","ref_meta":"","label":"âHow would u describe Jesus to a bunch of non-believers","content":"âHow would u describe Jesus to a bunch of non-believers"},{"data":"129","ref_meta":"","label":"Burn the old Joel Osteen podcasts from her desktop comp...","content":"Burn the old Joel Osteen podcasts from her desktop computer"},{"data":"172","ref_meta":"","label":"buy a new phone","content":"buy a new phone"},{"data":"208","ref_meta":"","label":"Buy New House","content":"Buy New House"},{"data":"142","ref_meta":"","label":"Child project of 122","content":"Child project of 122"},{"data":"359","ref_meta":"","label":"dddddddddddddd","content":"dddddddddddddd"},{"data":"190","ref_meta":"","label":"Fancy Project... that's really based on nothing","content":"Fancy Project... that's really based on nothing"},{"data":"241","ref_meta":"Trust in the Lord with All thine heart and lean not to thine own understanding","label":"Find stuff on Prime computer Inc case","content":"Find stuff on Prime computer Inc case"},
				{"data":"229","ref_meta":"","label":"Get a card &amp; write a check for Jennifer &amp; Joshu...","content":"Get a card &amp; write a check for Jennifer &amp; Joshua @ wedding"},{"data":"210","ref_meta":"","label":"Gifts: Data Migration/Import Project","content":"Gifts: Data Migration/Import Project"},{"data":"352","ref_meta":"","label":"go study","content":"go study"},{"data":"171","ref_meta":"","label":"go to mexico","content":"go to mexico"},{"data":"311","ref_meta":"","label":"Goal level Project - A","content":"Goal level Project - A"},{"data":"312","ref_meta":"","label":"Goal level Project - B","content":"Goal level Project - B"},{"data":"313","ref_meta":"","label":"Goal level Project - C","content":"Goal level Project - C"},{"data":"314","ref_meta":"","label":"Goal level Project - D","content":"Goal level Project - D"},{"data":"315","ref_meta":"","label":"Goal level Project - E","content":"Goal level Project - E"},{"data":"347","ref_meta":"","label":"hat trick","content":"hat trick"},{"data":"360","ref_meta":"","label":"hhhhhhhhhhhhhhhhhh","content":"hhhhhhhhhhhhhhhhhh"},{"data":"320","ref_meta":"","label":"I've got rhythm","content":"I've got rhythm"},
				{"data":"361","ref_meta":"","label":"jjjjjjjjjjjjjjj","content":"jjjjjjjjjjjjjjj"},{"data":"353","ref_meta":"","label":"la la la la","content":"la la la la"},{"data":"211","ref_meta":"","label":"Life App Improvement","content":"Life App Improvement"},{"data":"302","ref_meta":"","label":"Life Level Project #1","content":"Life Level Project #1"},{"data":"303","ref_meta":"","label":"Life level Project #2","content":"Life level Project #2"},{"data":"362","ref_meta":"","label":"mmmmmmmmmmmm","content":"mmmmmmmmmmmm"},{"data":"331","ref_meta":"","label":"My Block 11111111111","content":"My Block 11111111111"},{"data":"332","ref_meta":"","label":"My Block 222222222222","content":"My Block 222222222222"},{"data":"310","ref_meta":"","label":"my overdue project (again)","content":"my overdue project (again)"},{"data":"394","ref_meta":"","label":"my subproject2 for uber","content":"my subproject2 for uber"},{"data":"367","ref_meta":"Here are some keywords for my uber project","label":"My UBER Project","content":"My UBER Project"},{"data":"319","ref_meta":"","label":"new my proj","content":"new my proj"},{"data":"363","ref_meta":"","label":"nnnnnnnnnn","content":"nnnnnnnnnn"},{"data":"318","ref_meta":"","label":"Now I have some content","content":"Now I have some content"},{"data":"298","ref_meta":"","label":"open doc","content":"open doc"},{"data":"333","ref_meta":"","label":"Project AAAAAAAAAAAAAAAA","content":"Project AAAAAAAAAAAAAAAA"},{"data":"9","ref_meta":"","label":"Read article on google reader about reducing eyesstrain","content":"Read article on google reader about reducing eyesstrain"},
				{"data":"256","ref_meta":"","label":"Read thru romance book and schedule some stuff","content":"Read thru romance book and schedule some stuff"},{"data":"221","ref_meta":"","label":"Schedule a full Physical with Dr. Neiman","content":"Schedule a full Physical with Dr. Neiman"},{"data":"278","ref_meta":"","label":"Schedule an eye exam","content":"Schedule an eye exam"},{"data":"351","ref_meta":"","label":"seriously, go study","content":"seriously, go study"},{"data":"174","ref_meta":"","label":"short project","content":"short project"},{"data":"372","ref_meta":"","label":"sub proj 04","content":"sub proj 04"},{"data":"141","ref_meta":"","label":"Take over the world","content":"Take over the world"},{"data":"10","ref_meta":"","label":"Talk to HR person @ tuition reimbursement policy","content":"Talk to HR person @ tuition reimbursement policy"},{"data":"297","ref_meta":"","label":"trying a pdf file","content":"trying a pdf file"},{"data":"354","ref_meta":"","label":"ttttttttttttt","content":"ttttttttttttt"},{"data":"173","ref_meta":"","label":"upgrade car to bmw, or atleast something that lets you ...","content":"upgrade car to bmw, or atleast something that lets you go really fast, might need a radar detector too though"},{"data":"296","ref_meta":"","label":"uploading an image","content":"uploading an image"},{"data":"356","ref_meta":"","label":"uuuuuuuuuuuu","content":"uuuuuuuuuuuu"},{"data":"304","ref_meta":"","label":"Vision level project #1","content":"Vision level project #1"},{"data":"305","ref_meta":"","label":"Vision level project #2","content":"Vision level project #2"},{"data":"306","ref_meta":"","label":"Vision level project #3","content":"Vision level project #3"},{"data":"307","ref_meta":"","label":"Vision level project #4","content":"Vision level project #4"},{"data":"130","ref_meta":"","label":"We will never rise above the image we have of ourselves","content":"We will never risyyyyyyyyyyyyyyyyyy"}
			];

			//
		}
		
        public static function suite() : TestSuite {
        	//return new TestSuite( ParentProjectFieldTest );

            var TS : TestSuite = new TestSuite();
            TS.addTestSuite( ParentProjectFieldTest );
//            TS.addTest( new ParentProjectFieldTest("testSetValidValue") );
//            TS.addTest( new ParentProjectFieldTest("testObjectExists") );
//            TS.addTest( new ParentProjectFieldTest("testSetInvalidValue") );
            return TS;
 
        }
		
		public function testObjectExists() : void{
			var f : ParentProjectField = new ParentProjectField();
			assertFalse( "expecting non-null object", f == null );
		}
		
		public function testSetValidValue() : void{
			var f : ParentProjectField = new ParentProjectField();
			f.setValue( "211" );
			assertEquals( "expecting value set to 211", 211, f.getValue() );
		} 		        

		public function testSetInvalidValue() : void{
			var f : ParentProjectField = new ParentProjectField();
			f.setValue( "zzz" );
			assertEquals( "expecting value set to default", "", f.getValue() );
		} 		        

    }
    
}